pkgname=redis
pkgver=5.0
pkgrel=14
arch=('aarch64' 'x86_64')
url="https://redis.io"
license=('BSD')
makedepends_debian_11=(tar gcc gcc-c++ make libatomic)
source=("http://download.redis.io/releases/$pkgname-$pkgver.$pkgrel.tar.gz"
    "http://download.redis.io/releases/redis-6.2.9.tar.gz"
    )
md5sums=('5251b9cfe7d799e6b63b7bd07410f97c'
    '406a4ddbdf0b60b4f288bf0c3cb06933'
    )

build()
{
    cd "$srcdir/$pkgname-$pkgver.$pkgrel"
    make -j

    cd "$srcdir"/redis-6.2.9
    make -j
}

package()
{
    local benchmark_path="${pkgdir}/lkp/benchmarks"
    mkdir -p $benchmark_path/${pkgname}/ $benchmark_path/${pkgname}-client/ 
    cp -af "$srcdir/$pkgname-$pkgver.$pkgrel/"* "$benchmark_path/${pkgname}/"
    cp -af "$srcdir/redis-6.2.9/"* "$benchmark_path/${pkgname}-client/"
}
